package com.cn.pushpall;

import java.util.concurrent.*;

/**
 * Created by chenyuncong on 2019/8/15.
 */
public class MyThreadPoolExecutor {
    public static final ThreadPoolExecutor threadPoolExecutor = new ThreadPoolExecutor(1,4,1, TimeUnit.SECONDS,new ArrayBlockingQueue<>(16),(r, executor) -> {
        if(!executor.isShutdown()){
            try {
                executor.getQueue().put(r);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    });

    public MyThreadPoolExecutor() {

    }
}
